package com.labreeze.spring.ioc;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.labreeze.spring.pojo.User;

/**
 * 验证bean的域
 *
 */
public class App 
{
    public static void main( String[] args )
    {
       ApplicationContext ctx=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
       User user1=(User)ctx.getBean("user");
       user1.setUname("testName");
       user1.setPassWord("testPasswWorkd");
      
       
       User user2=(User)ctx.getBean("user");
       System.out.println(user2.getPassWord());
       
       System.out.println(user1==user2);
    }
}
